package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.io.Serializable;


/**
 * 用户信息
 * @author XJY
 */
public class User implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private String phone;					    //手机号码
	private String password;				    //密码
	private String img;							//头像
	private String name;					    //姓名
	private String nickName;				    //昵称
	private Date birthday;					    //生日
	private Integer gender;					    //性别(0未知  1女 2男)
	private Long accountId;					    //账号id
	private String loginName;				    //登录账号
	private String userNo;					    //用户编码
	private String sourceCode;					//渠道
	private Integer memberId;					//会员id
	private Date registerTime;					//注册时间
	private Double amount;					    //余额
	private Double score;					    //积分
	private String token;					    //用户token
	private Integer isVip;						//是否会员(0否 1是)
	
	//非数据库字段
	private Long leaderId;						//团长id(为0不是团长)
	private Integer leaderLevel;				//团长等级(0普通用户 1顶级团长 2二级团长)
	private String authStore;					//认证门店名称
	private String authStoreCode;				//认证门店店号
	private Integer isFans;						//粉丝(0否 1是)
	private String unionId;						//用户unionid
	
	
    public User(){

    }

    public User(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }


    public User(Long id,Date gmtCreated,Integer delStatus,Date gmtModify,String phone,String password,String img,String name,String nickName,Date birthday,Integer gender,Long accountId,String loginName,String userNo,String sourceCode,Integer memberId,Date registerTime,Double amount,Double score,Integer role,Integer leaderLevel,String token) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
       this.phone=phone;
       this.password=password;
       this.img=img;
       this.name=name;
       this.nickName=nickName;
       this.birthday=birthday;
       this.gender=gender;
       this.accountId=accountId;
       this.loginName=loginName;
       this.userNo=userNo;
       this.sourceCode=sourceCode;
       this.memberId=memberId;
       this.registerTime=registerTime;
       this.amount=amount;
       this.score=score;
       this.token=token;
    }


	public User(String nickName, String avatarUrl, Integer gender, String userNo,String phone) {
		// TODO Auto-generated constructor stub
		this.gmtCreated=new Date();
	    this.delStatus=DelStatus.NODEL;
	    this.gmtModify=gmtCreated;
	    this.nickName=nickName;
	    this.img=avatarUrl;
	    this.gender=gender;
	    this.userNo=userNo;
	    this.phone=phone;
	}

	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setPhone(String phone){
		this.phone=phone;
	}

	public String getPhone(){
		return phone;
	}

	public void setPassword(String password){
		this.password=password;
	}

	public String getPassword(){
		return password;
	}

	public void setImg(String img){
		this.img=img;
	}

	public String getImg(){
		return img;
	}

	public void setName(String name){
		this.name=name;
	}

	public String getName(){
		return name;
	}

	public void setNickName(String nickName){
		this.nickName=nickName;
	}

	public String getNickName(){
		return nickName;
	}

	public void setBirthday(Date birthday){
		this.birthday=birthday;
	}

	public Date getBirthday(){
		return birthday;
	}

	public void setGender(Integer gender){
		this.gender=gender;
	}

	public Integer getGender(){
		return gender;
	}

	public void setAccountId(Long accountId){
		this.accountId=accountId;
	}

	public Long getAccountId(){
		return accountId;
	}

	public void setLoginName(String loginName){
		this.loginName=loginName;
	}

	public String getLoginName(){
		return loginName;
	}

	public void setUserNo(String userNo){
		this.userNo=userNo;
	}

	public String getUserNo(){
		return userNo;
	}

	public void setSourceCode(String sourceCode){
		this.sourceCode=sourceCode;
	}

	public String getSourceCode(){
		return sourceCode;
	}

	public void setMemberId(Integer memberId){
		this.memberId=memberId;
	}

	public Integer getMemberId(){
		return memberId;
	}

	public void setRegisterTime(Date registerTime){
		this.registerTime=registerTime;
	}

	public Date getRegisterTime(){
		return registerTime;
	}

	public void setAmount(Double amount){
		this.amount=amount;
	}

	public Double getAmount(){
		return amount;
	}

	public void setScore(Double score){
		this.score=score;
	}

	public Double getScore(){
		return score;
	}

	public void setToken(String token){
		this.token=token;
	}

	public String getToken(){
		return token;
	}

	public Long getLeaderId() {
		return leaderId;
	}

	public void setLeaderId(Long leaderId) {
		if (leaderId!=null) {
			this.leaderId = leaderId;
		}else {
			this.leaderId = 0L;
		}
	}

	public String getAuthStore() {
		return authStore;
	}

	public void setAuthStore(String authStore) {
		this.authStore = authStore;
	}

	public String getAuthStoreCode() {
		return authStoreCode;
	}

	public void setAuthStoreCode(String authStoreCode) {
		this.authStoreCode = authStoreCode;
	}

	public Integer getIsVip() {
		return isVip;
	}

	public void setIsVip(Integer isVip) {
		this.isVip = isVip;
	}

	public Integer getLeaderLevel() {
		return leaderLevel;
	}

	public void setLeaderLevel(Integer leaderLevel) {
		this.leaderLevel = leaderLevel;
	}

	public Integer getIsFans() {
		return isFans;
	}

	public void setIsFans(Integer isFans) {
		this.isFans = isFans;
	}

	public String getUnionId() {
		return unionId;
	}

	public void setUnionId(String unionId) {
		this.unionId = unionId;
	}

}
